{extend name="public:layout" /}

{block name="title"}
	<title>{:site('siteName')}-即时转账</title>
{/block}

{block name="css"}
	<link rel="stylesheet" type="text/css" href="__STATIC__/{$theme}/css/user.css">
	<link rel="stylesheet" href="__STATIC__/share/css/share.css" type="text/css" />
	<style type="text/css">
		#smsTpl { display: none; }
	</style>
{/block}

{block name="content"}
	<div class="layui-main">
		<div class="user-main">
			<div class="user-left">
				{include file="public:user" index="0" /}
			</div>
			<div class="user-right">
				<div class="layui-tab layui-tab-brief">
					<ul class="layui-tab-title">
						<li class="layui-this">即时转账</li>
					</ul>
					<div class="layui-tab-content">
						<blockquote class="layui-elem-quote layui-quote-nm">转账说明：转账支出的是 {$currency.recharge} 和 {$currency.money}，可以兑换 {$currency.game} 和 {$currency.shopping}，以及转账给其他用户 {$currency.recharge} 。</blockquote>
						<form class="layui-form" action="{:url('index/user/transfer')}">
							<div class="layui-form-item margin-left-300 margin-top-25">
		                        <label class="layui-form-label width-small">
		                            转账方式
		                        </label>
		                        <div class="layui-input-block">
	                            	<input checked="" name="mode" title="转给自己" type="radio"  lay-filter="account" value="0">
	                                <input name="mode" title="转给别人" type="radio" lay-filter="account" value="1">
		                        </div>
		                    </div>
							<div class="layui-form-item" id="account">
				                
				            </div>
				            <div class="layui-form-item">
				                <label class="layui-form-label">转账类型</label>
				                <div class="layui-input-inline">
				                    <select lay-verify="required" name="type">
				                        <option value="0">{$currency.recharge} 转 {$currency.recharge}</option>
				                        <option value="1">{$currency.recharge} 转 {$currency.game}</option>
				                        <!-- <option value="2">{$currency.recharge} 转 {$currency.shopping}</option> -->
				                        <option value="3">{$currency.money} 转 {$currency.recharge}</option>
				                        <option value="4">{$currency.money} 转 {$currency.game}</option>
				                        <!-- <option value="5">{$currency.money} 转 {$currency.shopping}</option> -->
				                    </select>
				                </div>
				            </div>
							<div class="layui-form-item">
							    <label class="layui-form-label">转账金额</label>
							    <div class="layui-input-inline">
							    	<input type="text" name="money" lay-verify="required|number" class="layui-input">
							    </div>
							    <div class="layui-form-mid layui-word-aux">请输入正整数</div>
							</div>
							<div class="layui-form-item">
							    <label class="layui-form-label">支付密码</label>
							    <div class="layui-input-inline">
							    	<input type="password" name="pwd" lay-verify="required" class="layui-input">
							    </div>
							    <div class="layui-form-mid layui-word-aux">请输入支付密码</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label"></label>
							    <div class="layui-input-inline">
							    	<input type="hidden" name="__token__" value="{$Request.token}" />
							    	<button class="layui-btn layui-btn-main" lay-submit>确定</button>
							    </div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
{/block}

{block name="script"}
	<script type="text/javascript">
		layui.use(['jquery','form','element'], function(){
	
		var $ = layui.jquery;
		var form = layui.form();
		var element = layui.element();
  
	  	//一些事件监听
	  	form.on('radio(account)', function(data){
	  		var html = '<label class="layui-form-label">收款人</label>\
	                <div class="layui-input-inline">\
	                    <input type="text" name="account" lay-verify="required" class="layui-input">\
	                </div>\
	                <div class="layui-form-mid layui-word-aux">用户名或手机号</div>';
		  	if(data.value == 1){
		  		$("#account").append(html);
		  	}else{
		  		$("#account").html("");
		  	}
		});

	
	});
	</script>
{/block}